<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/WEB-INF/jsf/template.xhtml">

	<ui:define name="content">
		<h:form prependId="false">
			<p:commandButton image="back" ajax="false" immediate="true" style="margin-right:20px;" value="#{relationsmsgs['navigation.back']}" action="/jsf/relations/listRelationss.xhtml"/>
		
			<p:panel header="#{relationsmsgs['relations.title']} Details" style="margin-top:10px">
				<p:messages />
				<h:panelGrid id="detail" columns="2" styleClass="grid" columnClasses="label,value">
						<h:outputText value="#{relationsmsgs['relations.relrelation.title']}:" />
							<h:outputText value="#{RelationsComponent.relations.relRelation}"/>
						<h:outputText value="#{relationsmsgs['relations.rellibelledesc.title']}:" />
							<h:outputText value="#{RelationsComponent.relations.relLibelleDesc}"/>
						<h:outputText value="#{relationsmsgs['relations.rellibelleasc.title']}:" />
							<h:outputText value="#{RelationsComponent.relations.relLibelleAsc}"/>
						<h:outputText value="#{relationsmsgs['relations.reltype.title']}:" />
							<h:outputText value="#{RelationsComponent.relations.relType}"/>
				</h:panelGrid>
			</p:panel>

			<p:panel header="#{relationsmsgs['relationstiers.title']} Details" style="margin-top:10px">
			<p:commandButton image="new" ajax="false" style="margin-right:20px;" value="#{relationsmsgs['navigation.new']}" action="#{RelationsComponent.newRelationsRelationsTierses(RelationsComponent.relations.relRelation)}"/>
			<p:dataTable id="relationsTierses" value="#{RelationsComponent.listRelationsRelationsTierses(RelationsComponent.relations.relRelation)}"  var="current" rows="10" paginator="true" paginatorPosition="bottom">
				<p:column>
					<h:commandLink includeViewParams="true" action="#{RelationsComponent.selectRelationsRelationsTierses(RelationsComponent.relations.relRelation, current.rltTiersParent, current.rltTiersFils, current.rltRelation)}" >
						<h:graphicImage value="/images/icons/view.gif" style="border:0;"/>
					</h:commandLink>
					<h:commandLink includeViewParams="true" action="#{RelationsComponent.editRelationsRelationsTierses(RelationsComponent.relations.relRelation, current.rltTiersParent, current.rltTiersFils, current.rltRelation)}" >
						<h:graphicImage value="/images/icons/edit.gif" style="border:0;"/>
					</h:commandLink>
					<h:commandLink includeViewParams="true" action="#{RelationsComponent.confirmDeleteRelationsRelationsTierses(RelationsComponent.relations.relRelation, current.rltTiersParent, current.rltTiersFils, current.rltRelation)}" >
						<h:graphicImage value="/images/icons/delete.gif" style="border:0;"/>
					</h:commandLink>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{relationsmsgs['relationstiers.rlttiersparent.title']}" />
					</f:facet>
							<h:outputText value="#{current.rltTiersParent}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{relationsmsgs['relationstiers.rlttiersfils.title']}" />
					</f:facet>
							<h:outputText value="#{current.rltTiersFils}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{relationsmsgs['relationstiers.rltrelation.title']}" />
					</f:facet>
							<h:outputText value="#{current.rltRelation}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{relationsmsgs['relationstiers.rltsens.title']}" />
					</f:facet>
							<h:outputText value="#{current.rltSens}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{relationsmsgs['relationstiers.rltdatedebut.title']}" />
					</f:facet>
							<h:outputText value="#{current.rltDateDebut}"  converter="dateConverterForCalendar" />
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{relationsmsgs['relationstiers.rltdatefin.title']}" />
					</f:facet>
							<h:outputText value="#{current.rltDateFin}"  converter="dateConverterForCalendar" />
				</p:column>
			</p:dataTable>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>